package com.yang.service.model.dto.post;

import com.zhy.base.service.constraints.Phone;
import com.zhy.base.service.model.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotBlank;

/**
 * Created by xin7k
 * Date: 2019/12/17 0017
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@ApiModel
public class AddrPostDTO extends BaseDTO {

    @NotBlank(message = "收件人不能为空")
    @ApiModelProperty(value = "收件人", name = "consignee", required = true)
    private String consignee;

    @NotBlank(message = "地址详情不能为空")
    @ApiModelProperty(value = "地址详情", name = "addrValue", required = true)
    private String addrValue;

    @Phone
    @NotBlank(message = "收件人电话不能为空")
    @ApiModelProperty(value = "收件人电话", name = "phone",required = true)
    private String phone;

    @ApiModelProperty(value = "是否是默认地址", name = "isDefault")
    private Integer isDefault;


}
